package com.boruishangge.persagysdk.base;

import android.content.Context;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;

/**
 * Created by wuaomall@gmail.com on 2019/5/5.
 */


public  abstract class BaseFragment extends Fragment {
    protected Context fContext;
    public static EventBus eventBus;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        fContext = this.getActivity();
        eventBus = EventBus.getDefault();
        eventBus.register(this);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        eventBus.unregister(this);
    }

    @Subscribe
    public void baseSubscribe(BaseEvent baseEvent) {

    }

}

